<template>
	<van-card v-for="item,index in data" :key="index" :desc="item.content" :thumb="item.cover">
		<template #title>
			<router-link :to="{'name':'commodity_detail',
							  params:{
								title:item.title,
								classification:item.classification}}">
				{{item.title}}<br/>
			</router-link>
		</template>
		<template #tags>
			<van-tag plain color=#FFB5C5>{{item.classification}}</van-tag>
		</template>
		<template #footer>
			<van-button size="mini" icon="good-job-o"></van-button>
			<van-button size="mini" icon="star-o" to="/login"></van-button>
			<van-button size="mini" icon="comment-o" to="/login"></van-button>
		</template>
	</van-card>


</template>

<script lang="ts" setup>
	const props = defineProps({
		// 父组件传过来的数据
		data: Array
	})
</script>

<style scoped>	
	a {
		color: #333;
		font-size: 18px;
	}
</style>
